package com.pcitc.app.model;

import com.pcitc.app.model.BaseObject;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

import java.io.Serializable;

@Entity
@Table(name="TBL_MENU",schema="XZGD")
public class TblMenu extends BaseObject implements Serializable {
    private Long menuid;
    private String menuname;
    private String menuaction;
    private Long pmenuid;
    private Long menulevel;
    private Long submoduleid;
    private String issub;
    private String ismenuitem;
    private String menuseq;

    @Id  @GeneratedValue(strategy = GenerationType.AUTO)    
    public Long getMenuid() {
        return this.menuid;
    }
    
    public void setMenuid(Long menuid) {
        this.menuid = menuid;
    }
    
    @Column(name="MENUNAME", length=256)
    public String getMenuname() {
        return this.menuname;
    }
    
    public void setMenuname(String menuname) {
        this.menuname = menuname;
    }
    
    @Column(name="MENUACTION", length=256)
    public String getMenuaction() {
        return this.menuaction;
    }
    
    public void setMenuaction(String menuaction) {
        this.menuaction = menuaction;
    }
    
    @Column(name="PMENUID", precision=22, scale=0)
    public Long getPmenuid() {
        return this.pmenuid;
    }
    
    public void setPmenuid(Long pmenuid) {
        this.pmenuid = pmenuid;
    }
    
    @Column(name="MENULEVEL", precision=22, scale=0)
    public Long getMenulevel() {
        return this.menulevel;
    }
    
    public void setMenulevel(Long menulevel) {
        this.menulevel = menulevel;
    }
    
    @Column(name="SUBMODULEID", precision=22, scale=0)
    public Long getSubmoduleid() {
        return this.submoduleid;
    }
    
    public void setSubmoduleid(Long submoduleid) {
        this.submoduleid = submoduleid;
    }
    
    @Column(name="ISSUB", length=256)
    public String getIssub() {
        return this.issub;
    }
    
    public void setIssub(String issub) {
        this.issub = issub;
    }
    
    @Column(name="ISMENUITEM", length=256)
    public String getIsmenuitem() {
        return this.ismenuitem;
    }
    
    public void setIsmenuitem(String ismenuitem) {
        this.ismenuitem = ismenuitem;
    }
    
    @Column(name="MENUSEQ", length=200)
    public String getMenuseq() {
        return this.menuseq;
    }
    
    public void setMenuseq(String menuseq) {
        this.menuseq = menuseq;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TblMenu pojo = (TblMenu) o;

        if (menuname != null ? !menuname.equals(pojo.menuname) : pojo.menuname != null) return false;
        if (menuaction != null ? !menuaction.equals(pojo.menuaction) : pojo.menuaction != null) return false;
        if (pmenuid != null ? !pmenuid.equals(pojo.pmenuid) : pojo.pmenuid != null) return false;
        if (menulevel != null ? !menulevel.equals(pojo.menulevel) : pojo.menulevel != null) return false;
        if (submoduleid != null ? !submoduleid.equals(pojo.submoduleid) : pojo.submoduleid != null) return false;
        if (issub != null ? !issub.equals(pojo.issub) : pojo.issub != null) return false;
        if (ismenuitem != null ? !ismenuitem.equals(pojo.ismenuitem) : pojo.ismenuitem != null) return false;
        if (menuseq != null ? !menuseq.equals(pojo.menuseq) : pojo.menuseq != null) return false;

        return true;
    }

    public int hashCode() {
        int result = 0;
        result = (menuname != null ? menuname.hashCode() : 0);
        result = 31 * result + (menuaction != null ? menuaction.hashCode() : 0);
        result = 31 * result + (pmenuid != null ? pmenuid.hashCode() : 0);
        result = 31 * result + (menulevel != null ? menulevel.hashCode() : 0);
        result = 31 * result + (submoduleid != null ? submoduleid.hashCode() : 0);
        result = 31 * result + (issub != null ? issub.hashCode() : 0);
        result = 31 * result + (ismenuitem != null ? ismenuitem.hashCode() : 0);
        result = 31 * result + (menuseq != null ? menuseq.hashCode() : 0);

        return result;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer(getClass().getSimpleName());

        sb.append(" [");
        sb.append("menuid").append("='").append(getMenuid()).append("', ");
        sb.append("menuname").append("='").append(getMenuname()).append("', ");
        sb.append("menuaction").append("='").append(getMenuaction()).append("', ");
        sb.append("pmenuid").append("='").append(getPmenuid()).append("', ");
        sb.append("menulevel").append("='").append(getMenulevel()).append("', ");
        sb.append("submoduleid").append("='").append(getSubmoduleid()).append("', ");
        sb.append("issub").append("='").append(getIssub()).append("', ");
        sb.append("ismenuitem").append("='").append(getIsmenuitem()).append("', ");
        sb.append("menuseq").append("='").append(getMenuseq()).append("'");
        sb.append("]");
      
        return sb.toString();
    }

}
